Skip to content

feat(desktop): edit a vault item — change a value, remove a field, rename it - #25

Merged
pyramation merged 1 commit into
mainfrom
feat/edit-vault-items
Aug 9, 2026
Merged

feat(desktop): edit a vault item — change a value, remove a field, rename it#25
pyramation merged 1 commit into
mainfrom
feat/edit-vault-items

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

An item's fields were write-once in the UI: you could add, reveal, copy and never change. So rotating a password meant deleting the item. This adds the missing three: edit a value, remove a field, rename the item.

No new IPC or vault surface — the database already supported all of it, only the UI didn't call it. Editing is set_field with the same name and purpose, which the procedure resolves as ON CONFLICT (item_id, name) DO UPDATE, so the row is replaced in place and the fields trigger keeps the previous value in the item's password history:

startEdit = async (field) => setEditing({           // reveals to edit
  name: field.name,
  value: revealed[field.name] ?? await dcrypt.fields.reveal(item.id, field.name),
})
saveEdit = (field) =>
  dcrypt.fields.set(item.id, field.name, field.purpose, editing.value, field.concealed)

Carrying field.purpose and field.concealed through matters: dropping either would silently turn a totp_seed into text (breaking the code display) or unconceal a password.

Editing takes over the row — reveal/copy hide while it does, so there's no way to copy a half-typed value — and Esc abandons, Enter saves. Removing a field is behind a confirm that says plainly it is not the trash and cannot be undone, unlike an item. The title is click-to-rename in place, Esc to abandon.

Link to Devin session: https://app.devin.ai/sessions/04636534e07048089ffb6b78142e12cd
Requested by: @pyramation

@pyramation pyramation self-assigned this Aug 9, 2026
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation
pyramation merged commit 3c7234e into main Aug 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant